(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    ["pages/main/statistics/plantj"], {
        "319c": function (t, e, o) {},
        "393f": function (t, e, o) {
            "use strict";
            (function (t, e) {
                var a = o("4ea4");
                o("c150"), o("5c17"), o("a9ff");
                a(o("66fd"));
                var i = a(o("ce5b"));
                t.__webpack_require_UNI_MP_PLUGIN__ = o, e(i.default)
            }).call(this, o("bc2e")["default"], o("543d")["createPage"])
        },
        "3ad6": function (t, e, o) {
            "use strict";
            var a = o("319c"),
                i = o.n(a);
            i.a
        },
        "879c": function (t, e, o) {
            "use strict";
            o.d(e, "b", (function () {
                return i
            })), o.d(e, "c", (function () {
                return n
            })), o.d(e, "a", (function () {
                return a
            }));
            var a = {
                    uniForms: function () {
                        return Promise.all([o.e("common/vendor"), o.e("components/uni-forms/uni-forms")]).then(o.bind(null, "0933"))
                    },
                    uniFormsItem: function () {
                        return o.e("components/uni-forms-item/uni-forms-item").then(o.bind(null, "4828"))
                    },
                    dtSelect: function () {
                        return o.e("components/dt-select/dt-select").then(o.bind(null, "9fbf"))
                    }
                },
                i = function () {
                    var t = this.$createElement;
                    this._self._c
                },
                n = []
        },
        ce5b: function (t, e, o) {
            "use strict";
            o.r(e);
            var a = o("879c"),
                i = o("febf");
            for (var n in i)["default"].indexOf(n) < 0 && function (t) {
                o.d(e, t, (function () {
                    return i[t]
                }))
            }(n);
            o("3ad6");
            var r = o("f0c5"),
                d = Object(r["a"])(i["default"], a["b"], a["c"], !1, null, null, null, !1, a["a"], void 0);
            e["default"] = d.exports
        },
        d154: function (t, e, o) {
            "use strict";
            (function (t) {
                var a = o("4ea4");
                Object.defineProperty(e, "__esModule", {
                    value: !0
                }), e.default = void 0;
                var i = a(o("0436")),
                    n = {};

                function r(t) {
                    var e = new Date,
                        o = e.getFullYear(),
                        a = e.getMonth() + 1,
                        i = e.getDate();
                    return "start" === t ? o -= 10 : "end" === t && (o += 10), a = a > 9 ? a : "0" + a, i = i > 9 ? i : "0" + i, "".concat(o, "-").concat(a, "-").concat(i)
                }
                var d = {
                    data: function () {
                        return {
                            url: getApp().globalData.apiurl,
                            date: r({
                                format: !0
                            }),
                            dateend: r({
                                format: !0
                            }),
                            startDate: r("start"),
                            endDate: r("end"),
                            goods: [],
                            roles: [],
                            cWidth: 750,
                            cHeight: 500,
                            model: {
                                id: 0,
                                customerId: "",
                                goodId: "",
                                weight: 0,
                                unitPrice: 0,
                                totalPrice: 0,
                                roleId: "",
                                status: 0
                            }
                        }
                    },
                    methods: {
                        bindDateChange: function (t) {
                            this.date = t.detail.value
                        },
                        bindDateChangeend: function (t) {
                            this.dateend = t.detail.value
                        },
                        onReady: function () {
                            this.cWidth = t.upx2px(650), this.cHeight = t.upx2px(600), this.getServerData()
                        },
                        getServerData: function () {
                            var e = this;
                            setTimeout((function () {
                                e.model.id = 0, e.model.customerId = "", e.model.goodId = "", e.model.weight = 0, e.model.unitPrice = 0, e.model.totalPrice = 0, e.model.roleId = "", e.model.status = 0, t.request({
                                    url: e.url + "goodsmaintain/goods/list",
                                    method: "GET",
                                    data: {
                                        type: "2"
                                    },
                                    success: function (t) {
                                        e.goods = t.data.rows
                                    },
                                    fail: function () {},
                                    complete: function () {}
                                }), t.request({
                                    url: e.url + "statisticalchart/getPlanProschedulingList",
                                    method: "GET",
                                    data: {},
                                    success: function (t) {
                                        console.log(t.data);
                                        for (var o = t.data.data, a = [], i = [], n = 0; n < o.length; n++) a.push(o[n].goodsname), i.push(o[n].weight);
                                        console.log(0);
                                        let weight = 0;
                                        i.forEach(item => {
                                            weight += item
                                        })
                                        var r = {
                                            categories: a,
                                            series: [{
                                                name: "实际产量(吨)             生产总量 "+ parseFloat( weight).toFixed(2)+"吨",
                                                data: i
                                            }]
                                        };
                                        e.drawCharts("acZlYZcVpobJaZaxiTcPWxfqcgejFltK", r)
                                    },
                                    fail: function () {},
                                    complete: function () {}
                                })
                            }), 500)
                        },
                        submitForm: function () {
                            var e = this;
                            if (this.dateend >= this.date) {
                                console.log(this.model.goodId), t.request({
                                    url: this.url + "statisticalchart/getPlanProschedulingList",
                                    method: "GET",
                                    data: {
                                        goodsno: this.model.goodId,
                                        startTime: this.date,
                                        endTime: this.dateend
                                    },
                                    success: function (t) {
                                        for (var o = t.data.data, a = [], i = [], n = 0; n < o.length; n++) a.push(o[n].goodsname), i.push(o[n].weight);
                                        console.log(0);
                                        let weight = 0;
                                            i.forEach(item => {
                                                weight += item
                                            })
                                        var r = {
                                            categories: a,
                                            series: [{
                                                name: "实际产量(吨)             生产总量 "+ parseFloat( weight).toFixed(2)+"吨",
                                                data: i
                                            }]
                                        };
                                        e.drawCharts("acZlYZcVpobJaZaxiTcPWxfqcgejFltK", r)
                                    },
                                    fail: function () {},
                                    complete: function () {}
                                })
                            } else t.showToast({
                                title: "结束时间不可小于开始时间！",
                                icon: "error"
                            })
                        },
                        drawCharts: function (e, o) {
                            let LJJ =  this.cWidth - 50;
                            var a = t.createCanvasContext(e, this);
                            n[e] = new i.default({
                                type: "bar",
                                context: a,
                                width: LJJ,
                                height: this.cHeight,
                                categories: o.categories,
                                series: o.series,
                                animation: !0,
                                timing: "easeOut",
                                duration: 1e3,
                                rotate: !1,
                                rotateLock: !1,
                                background: "#FFFFFF",
                                color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
                                padding: [5, 30, 0, 5],
                                fontSize: 13,
                                fontColor: "#666666",
                                dataLabel: !0,
                                dataPointShape: !0,
                                dataPointShapeType: "solid",
                                touchMoveLimit: 60,
                                enableScroll: !1,
                                enableMarkLine: !1,
                                legend: {
                                    show: !0,
                                    position: "bottom",
                                    float: "center",
                                    padding: 5,
                                    margin: 5,
                                    backgroundColor: "rgba(0,0,0,0)",
                                    borderColor: "rgba(0,0,0,0)",
                                    borderWidth: 0,
                                    fontSize: 13,
                                    fontColor: "#666666",
                                    lineHeight: 20,
                                    hiddenColor: "#CECECE",
                                    itemGap: 30
                                },
                                xAxis: {
                                    boundaryGap: "justify",
                                    disableGrid: !1,
                                    min: 0,
                                    axisLine: !0,
                                    disabled: !1,
                                    axisLineColor: "#CCCCCC",
                                    calibration: !1,
                                    fontColor: "#666666",
                                    fontSize: 13,
                                    rotateLabel: !1,
                                    rotateAngle: 45,
                                    itemCount: 5,
                                    splitNumber: 3,
                                    gridColor: "#CCCCCC",
                                    gridType: "solid",
                                    dashLength: 4,
                                    gridEval: 1,
                                    scrollShow: !1,
                                    scrollAlign: "left",
                                    scrollColor: "#A6A6A6",
                                    scrollBackgroundColor: "#EFEBEF",
                                    formatter: ""
                                },
                                yAxis: {
                                    disabled: !1,
                                    disableGrid: !1,
                                    splitNumber: 5,
                                    gridType: "solid",
                                    dashLength: 8,
                                    gridColor: "#CCCCCC",
                                    padding: 10,
                                    showTitle: !1,
                                    data: []
                                },
                                extra: {
                                    bar: {
                                        type: "group",
                                        width: 30,
                                        meterBorde: 1,
                                        meterFillColor: "#FFFFFF",
                                        activeBgColor: "#000000",
                                        activeBgOpacity: .08,
                                        seriesGap: 2,
                                        categoryGap: 3,
                                        barBorderCircle: !1,
                                        linearType: "none",
                                        linearOpacity: 1,
                                        colorStop: 0
                                    },
                                    tooltip: {
                                        showBox: !0,
                                        showArrow: !0,
                                        showCategory: !1,
                                        borderWidth: 0,
                                        borderRadius: 0,
                                        borderColor: "#000000",
                                        borderOpacity: .7,
                                        bgColor: "#000000",
                                        bgOpacity: .7,
                                        gridType: "solid",
                                        dashLength: 4,
                                        gridColor: "#CCCCCC",
                                        fontColor: "#FFFFFF",
                                        splitLine: !0,
                                        horizentalLine: !1,
                                        xAxisLabel: !1,
                                        yAxisLabel: !1,
                                        labelBgColor: "#FFFFFF",
                                        labelBgOpacity: .7,
                                        labelFontColor: "#666666"
                                    },
                                    markLine: {
                                        type: "solid",
                                        dashLength: 4,
                                        data: []
                                    }
                                }
                            })
                        },
                        tap: function (t) {
                            n[t.target.id].touchLegend(t), n[t.target.id].showToolTip(t)
                        },
                        touchstart: function (t) {
                            n[t.target.id].scrollStart(t)
                        },
                        touchmove: function (t) {
                            n[t.target.id].scroll(t)
                        },
                        touchend: function (t) {
                            n[t.target.id].scrollEnd(t), n[t.target.id].touchLegend(t), n[t.target.id].showToolTip(t)
                        }
                    }
                };
                e.default = d
            }).call(this, o("543d")["default"])
        },
        febf: function (t, e, o) {
            "use strict";
            o.r(e);
            var a = o("d154"),
                i = o.n(a);
            for (var n in a)["default"].indexOf(n) < 0 && function (t) {
                o.d(e, t, (function () {
                    return a[t]
                }))
            }(n);
            e["default"] = i.a
        }
    },
    [
        ["393f", "common/runtime", "common/vendor"]
    ]
]);